package com.cy.shiro;

import org.apache.shiro.authc.UsernamePasswordToken;

/**
 * Created by cxn on 14-7-30.
 */
public class QyUsernamePasswordToken extends UsernamePasswordToken {
	//登陆用户类型
    private String type;
    public enum Type {
        USER(0, "user"),
        ACCOUNT(1, "account");

        private Integer code;
        private String value;

        public Integer getCode() {
            return code;
        }

        public String getValue() {
            return value;
        }

        private Type(Integer code, String value) {
            this.code = code;
            this.value = value;
        }
    }

    public QyUsernamePasswordToken(String username, char[] password, boolean rememberMe, String host, String type) {
        super(username, password, rememberMe, host);
        this.type = type;
    }

    public QyUsernamePasswordToken(String username, String password, String type) {
        super(username, password);
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
